function getxhr(){
	var xhr = false;
	if(window . XMLHttpRequest){
		xhr = new XMLHttpRequest();
	}else{
		xhr = window . ActiveXObject('Microsoft . XMLHttp');
	}
	return xhr;
}
function delete_confirm(){
	return event.returnValue = confirm("您确认要删除这条记录吗？");
}
function remove (node, url){
	if(delete_confirm()){
		var xhr = getxhr();
		xhr.open('GET', url, true);
		
		xhr.onreadystatechange=function (){
			if(xhr.readyState==4){
				if(xhr.responseText==1){
					var tr = node.parentNode.parentNode;
					tr.parentNode.removeChild(tr);
				}else if(xhr.responseText==3){
					alert('此栏目下有子孙栏目,不能删除！');
				}else{
					alert('error');
				}
			}
		}
		xhr.send(null);
	}
	
}


/*
function remove_goods (node, url){
	
	if(delete_confirm()){
		var xhr = getxhr();
		xhr.open('GET', url, true);
		
		xhr.onreadystatechange=function (){
			if(xhr.readyState==4){
				if(xhr.responseText==1){
					var tr = node.parentNode.parentNode;
					tr.parentNode.removeChild(tr);
				}else if(xhr.responseText==3){
					alert('此栏目下有子孙栏目,不能删除！');
				}else{
					alert('error');
				}
			}
		}
		xhr.send(null);
	}
	
}
*/
